1. Technical Field
The present disclosure relates to compatibility checking of software applications, and more specifically to identifying deprecated external routines invoked by a software application implementing subtype polymorphism.
2. Related Art
A software application refers to a set of instructions, which when executed performs various tasks defined by a program logic underlying the instructions. The instructions are often first developed using high level programming languages such as C, C++, Java, etc., and then converted into machine executable binary code using compiler type utilities, as is well known in the relevant arts.
The instructions are grouped into routines and modules for convenience of development, software management, code reuse, etc., as is also well known in the relevant arts. Some of the routines and modules are provided external to a software application, typically in the form of libraries to facilitate sharing by multiple applications. Such externally provided routines and modules are invoked using corresponding respective pre-determined conventions, by software instructions of each software application.
Deprecated routines are often a concern in software applications. A routine is said to be deprecated if continued use of the routine is undesirable in software applications. Such undesirability is found, for example, when a later/subsequent version of a library does not support the routine. As another example, some of the implementations of a library for different development environments (e.g., GNU C vs. Visual Studio) may not provide support for a routine. Accordingly during migration of a software application to an implementation not supporting the routine, the routine is said to be deprecated.
It is therefore desirable that invocation of such deprecated routines be identified in a software application. Such identification facilitates developers to address issues presented by deprecation of corresponding external routines.
Challenges are presented in identification of invocation of deprecated routines when software applications implement subtype polymorphism. Polymorphism refers to a programming approach in which related, but different, programming functionalities are implemented associated with the same identifier. Subtype polymorphism refers to a specific form of polymorphism in which different data (sub)types (domain of values, e.g., integer, real, complex, custom-defined types, etc.) can be substituted for a super data type (e.g., number). The sub and super data types together are referred to as polymorphic data types.
The approach of subtype polymorphism facilitates programming constructs (e.g., routines) to be written to operate on elements of the super type, and to be thereafter used with any of the different subtypes as well. Thus, in a software application implementing subtype polymorphism, the (same) identifier of the super-type is used to represent different subtypes. An instruction specifying invocation of a routine associated with a variable of a polymorphic data type, may (during execution) cause invocation of a corresponding routine in any of the super-type or subtypes.
Several aspects of the present invention facilitate identification of deprecated external routines invoked by a software application implementing subtype polymorphism.
In the drawings, like reference numbers generally indicate identical, functionally similar, and/or structurally similar elements. The drawing in which an element first appears is indicated by the leftmost digit(s) in the corresponding reference number.